package com.dream.example.provider;

import com.dream.RpcApp;
import com.dream.example.common.service.UserService;
import com.dream.rpc.registry.LocalRegistry;
import com.dream.rpc.server.VertxHttpServer;

/**
 * 简易服务提供者示例
 * @author Dreamer
 */
public class EasyProviderExample {


    public static void main(String[] args) {


        RpcApp.init();


        LocalRegistry.register(UserService.class.getName(), UserServiceImpl.class);

        //提供服务
        VertxHttpServer httpServer = new VertxHttpServer();
        httpServer.doStart(RpcApp.getRpcConfig().getServerPort());

    }
}
